import { createStore } from 'vuex'
// 导入持久化插件
import createPersistedState from 'vuex-persistedstate'

import cart from './modules/cart'
import user from './modules/user'
import category from './modules/category'

export default createStore({
  modules:{
    user,
    cart,
    category
  },
  plugins:[
    createPersistedState({
      // 本地存储的名字
      key:'eribbit-client-pc-125-store' ,
      // 需要存储的模块
      paths:['user','cart']
    })
  ]
})
